package fivecardstudd;
import java.util.*;


public class SmartAI extends AI {
	
	private Table table;
	private Hand AIHand;

	public SmartAI(int chips, Table table) {
		super(chips, table);
		
	}
	
 
 public void getSmartMove(){
	// if player has less than 2 cards faceup only bet if you have King or higher . if you have ace then raise
   //if its more than 3 only bet if you have at least a pair
	AIHand=getCurrentHand();
  if (AIHand.getCardCount()<2){
	  if(AIHand.getHand().get(0).getCardValue()<130){
		  fold();
	  }
	  else 
		  raise(getChips()/10);
  }
  else{
	int []visible=AIHand.determineVisibleHandRanking();
	int rank=visible[0];
	if(rank>1){
		raise(30);
	}
	else if(rank>3){
		allIn();
	}
	else
		fold();
 }
 }
	  

}